import React, { Component, ReactNode, useState } from 'react';
import ReactDOM from 'react-dom/client';
import './app.css'

const root = ReactDOM.createRoot(
  document.getElementById('root') as HTMLElement
);

interface iState{
  arr: number[][]
}


export default class App extends Component {
  state: iState = {
    arr:[
      [1,2,3],
      [4,5,6],
      [7,8,9]
    ]
  }

  render(): ReactNode {
    return <>
    <ul>
      {
        this.state.arr.map((item)=>{
          return <li key={item[0]}>
            {
              item.map((val)=>{
                return <span key={val}>{val}</span>
              })
            }
          </li>
        })
      }
    </ul>
    </>
  }
}

root.render(
    <App />
);

